/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ultrasoft.farmasoft.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Administrador
 */
@Embeddable
public class PharmacyproductPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "pharmacyId")
    private int pharmacyId;
    @Basic(optional = false)
    @Column(name = "providerId")
    private int providerId;
    @Basic(optional = false)
    @Column(name = "productId")
    private int productId;

    public PharmacyproductPK() {
    }

    public PharmacyproductPK(int pharmacyId, int providerId, int productId) {
        this.pharmacyId = pharmacyId;
        this.providerId = providerId;
        this.productId = productId;
    }

    public int getPharmacyId() {
        return pharmacyId;
    }

    public void setPharmacyId(int pharmacyId) {
        this.pharmacyId = pharmacyId;
    }

    public int getProviderId() {
        return providerId;
    }

    public void setProviderId(int providerId) {
        this.providerId = providerId;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) pharmacyId;
        hash += (int) providerId;
        hash += (int) productId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PharmacyproductPK)) {
            return false;
        }
        PharmacyproductPK other = (PharmacyproductPK) object;
        if (this.pharmacyId != other.pharmacyId) {
            return false;
        }
        if (this.providerId != other.providerId) {
            return false;
        }
        if (this.productId != other.productId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ultrasoft.farmasoft.domain.PharmacyproductPK[ pharmacyId=" + pharmacyId + ", providerId=" + providerId + ", productId=" + productId + " ]";
    }
    
}
